home *** CD-ROM | disk | FTP | other *** search
-
-
-
- COMBINE(1) COMBINE(1)
-
-
-
- N✓N✓N✓NA✓A✓A✓AM✓M✓M✓ME✓E✓E✓E
- combine, combine2 - compare or combine 2 or 3 source files
-
- S✓S✓S✓SY✓Y✓Y✓YN✓N✓N✓NO✓O✓O✓OP✓P✓P✓PS✓S✓S✓SI✓I✓I✓IS✓S✓S✓S
- c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e [-✓-✓-✓-B✓B✓B✓Bb✓b✓b✓bH✓H✓H✓Hh✓h✓h✓hq✓q✓q✓qs✓s✓s✓s] [-✓-✓-✓-c✓c✓c✓c #,#] [-✓-✓-✓-d✓d✓d✓d flag] [-✓-✓-✓-L✓L✓L✓L #] [-✓-✓-✓-P✓P✓P✓P #] [-✓-✓-✓-p✓p✓p✓p #]
- [-✓-✓-✓-1✓1✓1✓1 text] [-✓-✓-✓-2✓2✓2✓2 text]
- old_file new1_file [new2_file]
-
- c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e2✓2✓2✓2 temp_file merged_file
-
- D✓D✓D✓DE✓E✓E✓ES✓S✓S✓SC✓C✓C✓CR✓R✓R✓RI✓I✓I✓IP✓P✓P✓PT✓T✓T✓TI✓I✓I✓IO✓O✓O✓ON✓N✓N✓N
- _✓C_✓o_✓m_✓b_✓i_✓n_✓e compares the differences between 2 or 3 source files
- and produces a result file. Where `old_file' is the name of
- the original file, `new1_file' is a file containing modifi-
- cations to `old_file', and `new2_file' is a file containing
- a different set of modifications to `old_file'.
-
- The option arguments are:
-
- -✓-✓-✓-H✓H✓H✓H Help option -- Print a brief help message and exit.
-
- -✓-✓-✓-b✓b✓b✓b Blank compress option -- Causes _✓c_✓o_✓m_✓b_✓i_✓n_✓e to treat
- all sequences of blanks and horizontal tabs as a
- single blank.
-
- -✓-✓-✓-B✓B✓B✓B Blank remove option -- Causes _✓c_✓o_✓m_✓b_✓i_✓n_✓e to ignore all
- blanks and horizontal tabs in a line when comparing
- lines.
-
- -✓-✓-✓-c✓c✓c✓c #✓#✓#✓#,✓,✓,✓,#✓#✓#✓# Column specification option -- Specifies the column
- range to be compared. By default, all columns are
- compared. The number of the first column to com-
- pare immediately follows the -✓-✓-✓-c✓c✓c✓c option. The number
- of the last column to compare is separated from the
- first column to compare by a comma. Up to 32 dif-
- ferent column ranges may be given.
-
- For example,
- combine -c10,20 a b c
- compares only columns 10 through 20.
-
- -✓-✓-✓-d✓d✓d✓d f✓f✓f✓fl✓l✓l✓la✓a✓a✓ag✓g✓g✓g Debug options -- specifies how much debug informa-
- tion is to be output. The possibilities are: -✓-✓-✓-d✓d✓d✓d1✓1✓1✓1,✓,✓,✓,
- pass1 debug; -✓-✓-✓-d✓d✓d✓d2✓2✓2✓2,✓,✓,✓, pass2 debug; -✓-✓-✓-d✓d✓d✓d3✓3✓3✓3,✓,✓,✓, pass3 debug;
- -✓-✓-✓-d✓d✓d✓d4✓4✓4✓4,✓,✓,✓, pass4 debug; -✓-✓-✓-d✓d✓d✓d5✓5✓5✓5,✓,✓,✓, pass5 debug; and -✓-✓-✓-d✓d✓d✓da✓a✓a✓a,✓,✓,✓, all
- debug.
-
- -✓-✓-✓-h✓h✓h✓h h option -- produces a composite file on standard
- output suitable for input into _✓c_✓o_✓m_✓b_✓i_✓n_✓e_✓2(1). The
- file is an ASCII text file which may be manually
- modified by an text editor such as _✓v_✓i(1). The
-
-
-
- Page 1 D
-
-
-
-
-
-
- COMBINE(1) COMBINE(1)
-
-
-
- example below describes the use of this option in
- detail.
-
- -✓-✓-✓-L✓L✓L✓L #✓#✓#✓# Lines option -- Specify the number of lines to be
- printed on a page of the standard output file.
- Specifying zero lines (-✓-✓-✓-L✓L✓L✓L0✓0✓0✓0) disables pagination of
- the output file. The default page length is 66
- lines. This option is used only if the -✓-✓-✓-h✓h✓h✓h option
- is not specified.
-
- -✓-✓-✓-p✓p✓p✓p #✓#✓#✓# Postfix option -- The number of unchanged lines to
- output to the standard output file following any
- group of changed lines. The number of unchanged
- lines is specified by the argument following the -✓-✓-✓-p✓p✓p✓p
- option. The default is 5. This option is used only
- if the -✓-✓-✓-h✓h✓h✓h option is not specified.
-
- -✓-✓-✓-P✓P✓P✓P #✓#✓#✓# Prefix option -- The number of unchanged lines to
- output to the standard output file prior to any
- group of changed lines. The number of unchanged
- lines is specified by the argument following the -✓-✓-✓-P✓P✓P✓P
- option. The default is 5. This option is used only
- if the -✓-✓-✓-h✓h✓h✓h option is not specified.
-
- -✓-✓-✓-q✓q✓q✓q Quiet option -- Specifies that no output is to be
- generated to the standard output file if no changes
- are detected.
-
- -✓-✓-✓-s✓s✓s✓s Statistics option -- Specifies that performance
- statistics are to be output to standard output when
- c✓c✓c✓co✓o✓o✓om✓m✓m✓mb✓b✓b✓bi✓i✓i✓in✓n✓n✓ne✓e✓e✓e is finished.
-
- -✓-✓-✓-1✓1✓1✓1 t✓t✓t✓te✓e✓e✓ex✓x✓x✓xt✓t✓t✓t New1 file description -- Symbolic description of
- the `new1' file. This text is printed as the
- description of the new1 file on the listing output
- and h option output file.
-
- -✓-✓-✓-2✓2✓2✓2 t✓t✓t✓te✓e✓e✓ex✓x✓x✓xt✓t✓t✓t New2 file description -- Symbolic description of
- the `new2' file. This text is printed as the
- description of the new1 file on the listing output
- and h option output file.
-
- E✓E✓E✓EX✓X✓X✓XA✓A✓A✓AM✓M✓M✓MP✓P✓P✓PL✓L✓L✓LE✓E✓E✓E
- _✓C_✓o_✓m_✓b_✓i_✓n_✓e may be used to perform a simple two file comparison.
- by merely omitting the name of the third file.
-
- _✓C_✓o_✓m_✓b_✓i_✓n_✓e is best suited to do a three file comparison. Con-
- sider a file which is being modified along two development
- paths. The original copy of the file with no modifications
- is called the `old' file. The copy modified along one
- development path is called the `new1' file. The copy modi-
- fied along the other development path is called the `new2'
-
-
-
- Page 2 D
-
-
-
-
-
-
- COMBINE(1) COMBINE(1)
-
-
-
- file. The following is a guide for producing a 'merged'
- file which contains both set of modifications.
-
- First, _✓c_✓o_✓m_✓b_✓i_✓n_✓e is called with the following command line:
- combine -h old new1 new2 >temp_file
- The `temp_file' contains all of the lines from the `old',
- `new1' and `new2' files combined with control lines. A con-
- trol line identifies those portions of the `temp_file' which
- represent modifications made by the `new1' and `new2' files.
-
- Text which is inserted by the `new1' or `new2' file is sur-
- rounded by an ~~Insert line and an ~End line. The ~~Insert
- line also contains comments indicating which of the two
- files the inserted lines came from and whether the insertion
- was involved in a `move' operation. In the example below,
- the line `apple' was inserted between two already existing
- lines `bob' and `fred'.
- bob
- ~~Insert 'file2'
- apple
- ~End of changes
- fred
- Text which is deleted by the `new1' or `new2' file is sur-
- rounded by an ~~Delete line and an ~End line. The ~~Delete
- line also contains comments indicating which of the two
- files deleted the specified lines an whether the deletion is
- a side effect of a `move' operation. In the example below,
- the line `apple' was deleted from between the lines `bob'
- and `fred'.
- bob
- ~~Delete 'file1'
- apple
- ~End of changes
- fred
- The `temp_file' may be edited with any text editor. Changes
- in the `temp_file' can easily be found by finding lines with
- two tildes (~~) on them. Changes which are correct should be
- left alone. Changes which are wrong should be fixed. Deleted
- text can be allowed to remain in the file by merely deleting
- the ~~Delete line. Things to watch out for during this pro-
- cess include: Lines which are inserted by both the `new1'
- and `new2' files, and lines which are deleted by both the
- `new1' and `new2' files.
-
- After all of the changes have been made in the tempfile,
- _✓c_✓o_✓m_✓b_✓i_✓n_✓e_✓2(_✓1) should be used to produce the merged file. _✓C_✓o_✓m_✓-
- _✓b_✓i_✓n_✓e_✓2(_✓1) is called with the following command line:
- combine2 temp_file merged_file
-
-
- Page 3 D
-
-
-
-
-
-
- COMBINE(1) COMBINE(1)
-
-
-
- _✓C_✓o_✓m_✓b_✓i_✓n_✓e_✓2(_✓1) produces a merged file by removing the control
- lines and the deleted lines from the temp file. If the name
- of the temp file is omitted, standard input is used. If the
- name of the merged file is omitted, standard output is used.
-
- S✓S✓S✓SE✓E✓E✓EE✓E✓E✓E A✓A✓A✓AL✓L✓L✓LS✓S✓S✓SO✓O✓O✓O
- cmp(1), combine2(1), comm(1), diff(1), diff3(1)
-
- D✓D✓D✓DI✓I✓I✓IA✓A✓A✓AG✓G✓G✓GN✓N✓N✓NO✓O✓O✓OS✓S✓S✓ST✓T✓T✓TI✓I✓I✓IC✓C✓C✓CS✓S✓S✓S
- Exit status is 0 for files identical, 1 for some differ-
- ences, 2 for errors.
-
- A✓A✓A✓AU✓U✓U✓UT✓T✓T✓TH✓H✓H✓HO✓O✓O✓OR✓R✓R✓R
- Clifford P. Van Dyke
-
- B✓B✓B✓BU✓U✓U✓UG✓G✓G✓GS✓S✓S✓S
- Does not allow input file to be specified as - to indicate
- stdin.
-
- Does not allow comparison of binary files. Does not always
- complain if an input file is a binary file.
-
- Does not check to see if two files have the same inode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 4 D
-
-
-
-